There are three ways of inserting a style sheet:

  1. Inline Style
  2. Internal Stylesheet
  3. External Stylesheet

Inline Styles

  To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows below--  

<html>
<head>
<title>Creative Mission</title>
</head>
<body>
<h2 style="color:green; background:orange; width:230px; height:50px;"> Welcome to Creative Mission </h2>

</body>
</html>
   

Internal Style Sheet

  An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section of an HTML page, by using the <style> tag, like this:--  

<html>
<head>
<title>Creative Mission</title>
<style type='text/css'>
h2 { margin-left: 350px; }
body { background:orange; }
</style>
</head>
<body>

<h2 > Welcome to Creative Mission </h2>

</body>
</html>
 


All Tutorial => 12345678910





Write Comment